package Lexical;

public class Word extends Token 
{
	public final String value;
	
	/**
	 * Constructor of a Word.
	 * @param tag a tag object that represents the Word name.
	 * @param value the Word value or lexeme.
	 */
	public Word (Tag tag, String value) 
	{ 
		super (tag); 
		this.value = new String (value); 
	}
	
	/**
	 * Constructor of a Word.
	 * @param tag a tag object that represents the Word name.
	 * @param value the Word value or lexeme.
	 * @param line	the line of the code where the Token was found.
	 */
	public Word (Tag tag, String value, int line) 
	{ 
		super (tag, line); 
		this.value = new String (value); 
	}
	
	public String toString()
	{
		return value;
	}

}
